<style lang="less" scoped>
    .addtechnology {
        width: 100%;
        height: auto;
        overflow: hidden;
        text-align: left;
        padding: 8px;
        //display: flex;
    }
</style>
<template>
    <div class="addtechnology">
        <!--<my-card cardtitle="添加工艺：" :showright="false">
            <Steps :current="current">
                <Step title="基本信息"></Step>
                <Step title="工艺步骤"></Step>
                <Step title="工艺信息"></Step>
            </Steps>
        </my-card>-->
        <my-card cardtitle="添加工艺：" :showright="false">
            <template>
                <Steps :current="current" status="wait">
                    <Step :title="getcurrenttitle(0)" content="添加产品基本信息"></Step>
                    <Step :title="getcurrenttitle(1)" content="配置工艺步骤"></Step>
                    <Step :title="getcurrenttitle(2)" content="添加工艺参数"></Step>
                </Steps>
                <keep-alive :include="cachePage">
                    <router-view></router-view>
                </keep-alive>
                <Button type="primary" @click="current++">下一步</Button>
            </template>
        </my-card>
    </div>
</template>
<script>
    import CardTable from '../components/cardTable.vue'
    import MyCard from '../components/myCard.vue'
    export default {
        name: 'addtechnology',
        props: ['id'],
        data () {
            return {
                current: 0
            }
        },
        methods: {
            getcurrenttitle (index) {
                if (this.current < index) {
                    return '待进行'
                } else if (this.current == index) {
                    return '进行中'
                } else {
                    return '已完成'
                }
            }
        },
        components: {
            CardTable,
            MyCard
        },
        mounted: function () {
        }
    };
</script>
